package com.proyecto.track.bo;

import javax.persistence.*;

@Entity
public class UserTask {
	
	private Long id;
	private UserPerson userPerson;
	private Task task;
	private Double progress;
	private Double hours;
	private boolean active;
	
	public UserTask(){
		
	}
	
	public UserTask(Double progress, Double hours, boolean active){
		this.progress = progress;
		this.hours = hours;
		this.active = active;		
	}
	
	public UserTask(UserPerson userPerson, Task task, boolean active) {
		this.userPerson = userPerson;
		this.task = task;
		this.active = active;
	}

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	public UserPerson getUserPerson() {
		return userPerson;
	}
	public void setUserPerson(UserPerson userPerson) {
		this.userPerson = userPerson;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Task getTask() {
		return task;
	}
	public void setTask(Task task) {
		this.task = task;
	}
	public Double getProgress() {
		return progress;
	}
	public void setProgress(Double progress) {
		this.progress = progress;
	}
	public Double getHours() {
		return hours;
	}
	public void setHours(Double hours) {
		this.hours = hours;
	}
	public boolean isActive() {
		return active;
	}
	public void setActive(boolean active) {
		this.active = active;
	}
	
	
	
}
